﻿<Button OnClick="e => OnPlacementClick(Placement.TopEnd)">右上角</Button>
<Button OnClick="e => OnPlacementClick(Placement.BottomEnd)">右下角</Button>

<Toast @ref="Toast"></Toast>

@code{
    /// <summary>
    /// 
    /// </summary>
    [Inject] public ToastService? ToastService { get; set; }
    
    protected void OnPlacementClick(Placement placement)
    {
        Toast?.SetPlacement(placement);
        ToastService?.Show(new ToastOption()
        {
            Category = ToastCategory.Information,
            Title = "消息通知",
            Content = "<b>Toast</b> 组件更改位置啦，4 秒后自动关闭"
        });
    }
}
